A “virtual machine” is a self-contained operating environment that is executed by a computer processor, but behaves as if it is a separate computer. A virtual machine application will execute and run the same way in that virtual machine, no matter what kind of computer and operating system the virtual machine is running on. This offers the user true independence from any particular computer platform.
This system independence has resulted in virtual machines becoming common components of most web browsers. Website designers wishing to utilize small programs, or applets, on their web pages often utilize virtual machine applets, so that any visitor to the web page may run the applet regardless of the kind of computer or operating system they are using, requiring only that they have the appropriate virtual machine interpreter installed.
Most, but not all virtual machines are interpreters for an object-oriented programming language. The most common example of an object oriented programming language is JAVA (Sun Microsystems, Inc.). Interpreters and runtime environments for compiled JAVA code are called JAVA virtual machines, or JVMs. Although the JAVA virtual machine has become the industry standard, there are a variety of virtual machines that are derived from and/or are compatible with JAVA code, including but not limited to CHAI (Hewlett-Packard Company), KAFFE (TransVirtual Technologies, Inc.), LATTE (Seoul National University), and SABLEVM (Sable Research Group). Other virtual machines exist independent of the JAVA programming language, including the DIS virtual machine for the INFERNO operating system (a LIMBO compiler; Lucent Technologies, Inc.).
Class files are the components of compiled source code for the virtual machine. They exist in a precisely defined format, so that they may be loaded and executed by the appropriate virtual machine. Virtual machine class files are also platform-independent. Class files may be present as part of a “class package”, where a package is a collection of related classes and interfaces. The terms “class file”, “class package” and “class loader” as used here are independent of any particular virtual machine interpreter.
At present, developers of new virtual machine applications face difficulties in getting their new software to their users. One approach to distributing new or upgraded software is to create custom installation software, and incorporate it into a distribution package. The distribution package must then be sent to all the users of the software, either as a mass mailing that includes the software on a computer-readable medium, or by publishing the installation software on a network and permitting users to download the upgrade. The former is expensive and potentially wasteful, as it may target users who are not interested in getting the upgraded software package. The latter strategy may not reach every interested customer, generating customer ill will when software incompatibilities arise. In either event, these methods of distribution represent substantial overhead for software developers, particularly if the developer is new, small, or simply has limited resources.
Unfortunately, if developers do not earnestly attempt to keep their users updated with the most-recent versions or newest class files, errors may arise when virtual machine applications need a particular class file that the user does not have. The execution of a class file “A” may result in an instruction to execute class file “B”. If class file B is not found by the virtual machine, then it typically generates an “exception”. In general, an exception is generated whenever the virtual machine encounters a situation unforeseen by the virtual machine programmer (including but not limited to program errors). When an exception occurs, the virtual machine may attempt to locate code that will deal with the specific exception. Typically, a failure to find a requested class file results in a “Class Not Found” exception that is typically fatal, that is, it results in the virtual machine shutting down and failing to continue processing.
What is needed is a virtual machine configured such that, if it fails to find a requested class file, it searches for and locates the requested class file, downloads the requested class file, and executes it, all without generating an exception. This method could be used to update the class files of virtual machine users, and would virtually guarantee that the users of a particular class file would always have the most-recent version of the class file, without relying on expensive or ineffective distribution strategies.